package com.hs.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hs.server.domain.FrmWsStat;
import org.apache.ibatis.annotations.Select;

public interface FrmWsStatMapper extends BaseMapper<FrmWsStat> {
    //加sum()是为了防止结果为N/A的时候映射出问题，ifNull只能解决null的判断
    @Select("SELECT IFNULL(SUM(dyzcs),0) FROM frm_ws_stat WHERE jkid = #{jkid} AND date_format(dyrq,'%Y-%m-%d') = date_format(NOW(),'%Y-%m-%d')")
    int getDyzcs(String jkid);
}
